Salesforce UX API
TMF666- Account-SuspendorResume-in-Aria
This operation is used to pass the confirmation to Aria that the account suspend/resume due to dunning
Note - To work this functionality accountType & state should be mandatory
- For the 'state' the expected values will be
Suspended
(for account suspended communication ) /un-suspended
(for account resume communication ) - For the 'accountType' the expected values will be
SuspendedAccount
/unSuspendedAccount
, this will be not passed to Aria (using ESB internal to avoid routing conflict )
/billingAccount/{id} [PATCH]
URL
https://[localhost]:[port]/sfdc-ux/v1/{businessId}/billingAccount/{id}
url Param
name | type | description | required |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit. | Y |
id | string | Unique identifier of the account, in this case BAN-CAN (client ID of the account ) | Y |
Header
name | value | description | required |
---|---|---|---|
client_id | string | The client_id identifying the channel. | Y |
client_secret | string | Password associated with the client_id. | Y |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction | Y |
Request
Suspend account
curl --location --request PATCH 'https://nonprod.esb.cloud.lla.com/dev/sfdc-ux/sfdc-ux/v1/PR/billingAccount/ban-can' \
--header 'X-Correlation-Id: 1234567' \
--header 'client_id: 12abc' \
--header 'client_secret: 34abc' \
--header 'Content-Type: application/json' \
--data-raw '{
"accountType": "SuspendedAccount"
"state": "Suspended", /suspend_flag
"accountRelationship": [
{
"relationshipType": "contains",
"account": {
"id": "BAN-CAN-MPI", /plan_instance_id
"description": "Account Master Plan Instance ID"
}
}
]
}'
un-Suspend / resume account
curl --location --request PATCH 'https://nonprod.esb.cloud.lla.com/dev/sfdc-ux/sfdc-ux/v1/PR/billingAccount/ban-can' \
--header 'X-Correlation-Id: 1234567' \
--header 'client_id: 12abc' \
--header 'client_secret: 34abc' \
--header 'Content-Type: application/json' \
--data-raw '{
"accountType": "unSuspendedAccount"
"state": "un-suspended", /suspend_flag
"accountRelationship": [
{
"relationshipType": "contains",
"account": {
"id": "BAN-CAN-MPI", /plan_instance_id
"description": "Account Master Plan Instance ID"
}
}
]
}'
Request Definitions
Each of the request parameters is detailed.
Note - To work this functionality the "state" & "accountType" will be expected.
name | type | description | required |
---|---|---|---|
state | string | suspend or resume flag Expected values "suspended or un-suspended" | Y |
accountType | string | account type, Expecting values will be ‘ SuspendedAccount ' (for the suspend scenario) or ' unSuspendedAccount (for the un-suspend scenario). Note - This will be not passing to Aria, it will be used to avoid the conflict in ESB for routing towards Aria. | Y |
accountRelationship | array | Significant connection between accounts. For instance an aggregating account for a list of shop branches each having its own billing account. | Y |
accountRelationship.relationshipType | string | Type of relationship | N |
accountRelationship.account | object | Account reference. | Y |
accountRelationship.account. id | string | the client ID of the Master Plan Instance | Y |
accountRelationship.account.description | string | account type | N |
Response
In this section all the possible data structures received by the client at the moment of responding the method are defined.
Possible response success
This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.
[ 200 ]
OK - update request processed successfully, response body contains an entity corresponding to the requested resource.
Response
{
"state": "Suspended",
"description": "SUCCESS.\r\n\r\nNo line item (service) found in the invoice 1203282468 that is marked to be credited upon suspend / resume / upkeep. No credit memo created."
}
Response Definitions
name | type | description | required |
---|---|---|---|
state | string | acknowledge for suspend or resume transaction, Note: the same request state value will be mapped only for success scenario | N |
description | string | response message from Aria | N |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
{
"errors" : [{
"code" : 400,
"message" : "Bad Request",
"description" : "The request is invalid or not properly formed."
}]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
}]
}
[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors" : [{
"code" : 404,
"message" : "The request is invalid or not properly formed.",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method PATCH not allowed for : /{businessId}/billingAccount/{id}"
}]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "The request failed due to an internal error.",
"description": ""
}]
}
[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation PATCH /billingAccount/{id} for Business Id: xxxx not implemented"
}]
}